/**
 * Created with JetBrains WebStorm.
 * User: mumble
 * Date: 6/22/12
 * Time: 10:23 PM
 * To change this template use File | Settings | File Templates.
 */
module.exports.Configuration = {
    app_name : "Casula game",
    is_debug : true,
    db_url : "mongodb://localhost:27017/CasualGame",
    host : "127.0.0.1",
    webserver_port : 80,
    websocket_port : 8081,
    max_connection : 1000
}


module.exports.initializeExpressConfig = function(app, express)
{
    app.configure(function(){
        app.set('views', __dirname + '/../views');
        app.set('view engine', 'jade');
        app.use(express.bodyParser());
        app.use(express.methodOverride());
        app.use(require('stylus').middleware({ src: __dirname + '/public' }));
        app.use(app.router);
        app.use(express.static(__dirname + '/public'));
    });

    app.configure('development', function(){
        app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
    });

    app.configure('production', function(){
        app.use(express.errorHandler());
    });

}